﻿@model List<LAPI.Data.Model.Reserva>
           
<div class="row">
    <h2>Mis reservas</h2>
    <h3>Consulte sus reservas en LAPI... </h3>
</div>
<hr />

<div class="row">
<div id="msg" class="span5"></div> 
</div>

<div class="marketing">

    <div class="row span11">
            @using (Ajax.BeginForm(
                actionName: "Buscar",
                controllerName: "Reservas",
                routeValues: null,
                ajaxOptions: new AjaxOptions { HttpMethod = "Post", InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace, UpdateTargetId = "grid"/*, OnFailure = "PostFailure", OnSuccess = "PostSuccess", OnComplete = "PostOnComplete"*/ },
                htmlAttributes: new Dictionary<string, object> { { "class", "well form-inline" } }
            ))
            {    
                
                <span class="span2">
                    <input type="text" class="input-small span2" placeholder="filtrar por centro" name="centroFilter"/>
                </span>
                
                <span class="span2">
                    <input type="text" class="input-small span2" placeholder="filtrar por pista" name="pistaFilter"/>
                </span>
                
                <span class="span2">
                    <input type="text" class="input-small span2" placeholder="filtrar por deporte" name="deporteFilter"/>
                </span>
                
                <span class="span3">
                    <div class="input-append">
                      <input class="span2" size="16" type="text" name="fechaFilter" id="fechaFilter" placeholder="filtrar por fecha" value="" data-date-format="yyyy-mm-dd" />
                      <span class="add-on">
                        <i class="icon-remove-circle" onclick="document.forms[0].fechaFilter.value=''"></i>
                      </span>
                    </div>                    
                </span>                
                
                <span class="span1">
                    <button type="submit" class="btn-mini btn">
                         <i class="icon-search"></i>
                        Filtrar
                    </button>       
                </span>        
            }                        
    </div>
        
    <div class="row span11" id="grid">
        @Html.Partial("_ListadoMisReservas" , Model)
    </div>

</div>

@section Script {   
<script type="text/javascript">
    $('#fechaFilter').datepicker();
</script>
}